<!DOCTYPE html>
<html>
    <head>
        <title>音速风暴-订单详情</title>
        <link rel="stylesheet" href="/static/weui.min.1.1.css">
        <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
        <link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <style>
            .page__hd {
                padding: 40px;
            }
            .page__title {
                text-align: left;
                font-size: 20px;
                font-weight: 400;
            }
            .page, body{background-color: #fbf9fe}
        </style>
    </head>
    <body>
        <div class="page__hd">
            <h1 class="page__title">{{ order.get('product_name') }}</h1>
            <p class="page__desc"> {{ status_text.get(str(order.get('order_status')), '未知状态')}} </p>
            <i style="position: absolute; top: 75px; right: 40px; font-size: 50px;" class="weui-icon-{{ status_i.get(str(order.get('order_status')), 'info')}} weui-icon_msg"></i>
        </div>
        <div class="weui-form-preview page">
            <div class="weui-form-preview__hd">
                <div class="weui-form-preview__item">
                    <label class="weui-form-preview__label">付款金额</label>
                    <em class="weui-form-preview__value">¥{{ '%.2f' % (order.get('order_total_price')/100.0) }}</em>
                </div>
            </div>
            
            <div class="weui-form-preview__bd">
                <div class="weui-form-preview__item">
                    <label class="weui-form-preview__label">订购单号</label>
                    <span class="weui-form-preview__value">{{ order.get('order_id') }}</span>
                </div>
                <div class="weui-form-preview__item">
                    <label class="weui-form-preview__label">交易单号</label>
                    <span class="weui-form-preview__value">{{ order.get('trans_id') }}</span>
                </div>                
                <div class="weui-form-preview__item">
                    <label class="weui-form-preview__label">创建时间</label>
                    <span class="weui-form-preview__value">{{ fromtimestamp(order.get('order_create_time')).strftime('%Y-%m-%d %H:%M:%S') }}</span>
                </div>                   
                <div class="weui-form-preview__item">
                    <label class="weui-form-preview__label">商品类目</label>
                    <span class="weui-form-preview__value">音速风暴产品</span>
                </div>
                <div class="weui-form-preview__item">
                    <label class="weui-form-preview__label">商品名称</label>
                    <span class="weui-form-preview__value">{{ order.get('product_name') }}</span>
                </div>
                <div class="weui-form-preview__item">
                    <label class="weui-form-preview__label">商品数量</label>
                    <span class="weui-form-preview__value">{{ order.get('product_count') }}件</span>
                </div>                
                {% if order.get('product_sku') %}
                <div class="weui-form-preview__item">
                    <label class="weui-form-preview__label">商品套餐</label>
                    <span class="weui-form-preview__value">{{ order.get('product_sku') }}</span>
                </div>
                {% endif %}
                <div class="weui-form-preview__item">
                    <label class="weui-form-preview__label">购买人</label>
                    <span class="weui-form-preview__value">{{ order.get('buyer_nick') }}</span>
                </div>
                <div class="weui-form-preview__item">
                    <label class="weui-form-preview__label">收件人</label>
                    <span class="weui-form-preview__value">{{ order.get('receiver_name') }}</span>
                </div>
                <div class="weui-form-preview__item">
                    <label class="weui-form-preview__label">联系电话</label>
                    <span class="weui-form-preview__value">{{ order.get('receiver_phone') }}</span>
                </div>
                <div class="weui-form-preview__item">
                    <label class="weui-form-preview__label">收件地址</label>
                    <span class="weui-form-preview__value">{{ '%s%s%s%s' % (order.get('receiver_province'), order.get('receiver_city'), order.get('receiver_zone'), order.get('receiver_address')) }} </span>
                </div>
                {% if order.get('delivery_company')%}
                <div class="weui-form-preview__item">
                    <label class="weui-form-preview__label">快递公司</label>
                    <span class="weui-form-preview__value">{{ delivery_text.get(order.get('delivery_company')) }}</span>
                </div>
                <div class="weui-form-preview__item">
                    <label class="weui-form-preview__label">快递编号</label>
                    <span class="weui-form-preview__value">{{ order.get('delivery_id') }}</span>
                </div>
                {% endif %}{##}
            </div>
            <div class="weui-form-preview__ft">
                <a class="weui-form-preview__btn weui-form-preview__btn_primary" href="http://mp.weixin.qq.com/bizmall/malldetail?id=&pid={{ order.get('product_id') }}&biz=MzIwMjA5OTg0NA==&scene=&action=show_detail&showwxpaytitle=1#wechat_redirect">商品详情</a>
            </div>
        </div> 
    </body>   
<html>
